package com.wdl.networkflow.pv

import org.apache.flink.api.java.tuple.Tuple
import org.apache.flink.streaming.api.functions.KeyedProcessFunction
import org.apache.flink.streaming.api.scala.function.WindowFunction
import org.apache.flink.streaming.api.windowing.windows.TimeWindow
import org.apache.flink.util.Collector

class PvCountWindowResult() extends WindowFunction[Long, PvCountView, String, TimeWindow]{
  override def apply(key: String, window: TimeWindow, input: Iterable[Long], out: Collector[PvCountView]): Unit = {

    out.collect(PvCountView(window.getEnd, input.head))
  }
}
